package cn.Y_Qiu.org.service.impl;

import cn.Y_Qiu.basic.service.impl.BaseServiceImpl;
import cn.Y_Qiu.org.domain.DictionaryType;
import cn.Y_Qiu.org.mapper.DictionaryDetailMapper;
import cn.Y_Qiu.org.mapper.DictionaryTypeMapper;
import cn.Y_Qiu.org.service.IDictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DictionaryTypeServiceImpl  extends BaseServiceImpl<DictionaryType> implements IDictionaryTypeService {
    @Autowired
    private DictionaryTypeMapper dictionaryTypeMapper;
    @Autowired
    private DictionaryDetailMapper dictionaryDetailMapper;

    @Override
    public void remove(Long id) {
        dictionaryDetailMapper.removeByTypeId(id);
        dictionaryTypeMapper.remove(id);
    }
    @Override
    public void patchremove(List<Long> ids) {
        dictionaryDetailMapper.removeByTypeIds(ids);
        dictionaryTypeMapper.patchremove(ids);
    }

}
